<template>
<!--component/empty.wxml-->
<view class="noData">
  <image  mode="widthFix" class="img" :style="'width: 404rpx;margin-top: ' + marginTop + 'rpx;'" :src="src"></image>
  <view class="title">{{message}}</view>
</view>
</template>

<script>

export default {
  "name":"empty",
  data() {
    return {
		src:"",
		message:"空空如也哦～"
	};
  },

  components: {},
  props: {
    marginTop: {
      type: Number,
      default: 100
    },
	type:{ // message order common
		type:String,
		default:"common"
	}
  },
  created() {
  	if(this.type == "message"){
		this.src = "../static/common/img_empty_message.png"
		this.message = ""
	}else if(this.type == "order"){
		this.src = "../static/common/img_empty_order.png"
		this.message = "暂无订单"
	}else{
		this.src = "../static/common/img_empty.png"
		this.message = "空空如也哦～"
	}
  },
  methods: {}
};
</script>
<style>
.noData {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: 20rpx;
}
.img{
	
}
.noData .title {
  font-size: 28rpx;
  color: #8E989D;
  font-weight: normal;
  margin: 10rpx 0 0 0;
}

.noData .action {
  background-color: #00ED9F;
  margin-top: 10rpx;
  color: #FFF;
  font-size: 24rpx;
  padding: 3rpx 20rpx;
  border-radius: 10rpx;
}
</style>